from datetime import date
import calendar

def get_first_and_last_day(year,month):
    weekday,month_len = calendar.monthrange(year,month)
    first_day = date(year,month,day=1)
    last_day = date(year,month,day=month_len)
    return first_day,last_day

year = date.today().year
month = date.today().month
print(get_first_and_last_day(year,month))